<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_ace.jsp"%>
<style type="text/css">
sample-table-1 tbody td{
  
}
</style>
<script type="text/javascript">

$(function(){
	$('.tipMe').tooltip({'placement':'top'});
});
function search(form) {
	$(form).appendPagerParaStr();
	return true;
}

function deleteById(id){
	ui.confirm('确认删除?',function(){
		 $.ajax({
			   type: "POST",
			   dataType:"json",
			   cache: false,
			   url: _ctx + "/monitor/send_cm_data_delete.do",
			   data: {id:id},
			   success: function(resp){
				   if(resp.status == '1'){
					   ui.msg(resp.msg, 1);
					   ui.go(_ctx + '/monitor/send_cm_data_list.do');
				   }else{
					   ui.msg(resp.msg, 0);
				   }
			   },
			   error:function(){
				   ui.msg('信息加载错误', 0);
			   }
		}); 
	});	
}


function deleteByBatch(){
	var isSlected = checkAll.isChecked();
	if(!isSlected){
		ui.msg('请至少选择一条要删除的记录!');
		return;
	}
	var ids = checkAll.getIdsAsArr();
	ui.confirm('确认删除?',function(){
		$.ajax({
			   type: "POST",
			   dataType:"json",
			   cache: false,
			   url: _ctx + "/monitor/send_cm_data_deletes.do",
			   traditional: true,
			   data:{ids:ids},
			   success: function(resp){
				   if(resp.status== '1'){
					   ui.msg(resp.msg, 1);
					   ui.go(_ctx + '/monitor/send_cm_data_list.do');
				   }else{
					   ui.msg(resp.msg, 0);
				   }
			   },
			   error:function(){
				   ui.msg('信息加载错误', 0);
			   }
		});
	}); 
}


</script>
</head>
<body>
<%@ include file="/WEB-INF/view/common/topbar.jsp"%>
<div class="main-container" id="main-container">
	<div class="main-container-inner">
		<%@ include file="/WEB-INF/view/common/sidebar.jsp"%>
		<div class="main-content">
			<div class="breadcrumbs" id="breadcrumbs">
				<ul class="breadcrumb">
					<li>
						<i class="icon-home home-icon"></i>
						<a href="javascript:void(0);">首页</a>
					</li>
					<li>
						<a href="javascript:void(0);">数据交换监控</a>
					</li>
					<li class="active">刻盘管理</li>
				</ul>
			</div>

			<div class="page-content">
				<div class="row">
					<div class="col-xs-12">
						
						<div class="widget-box">
							<div class="widget-header header-color-white">
								<div class="widget-toolbar no-border">
								   <a href="#" data-action="collapse">
										<i class="icon-chevron-up"></i>
									</a>
								</div>
							</div>

							<div class="widget-body">
								<div class="widget-main">
								     <div class="alert alert-block alert-success">
										<button class="close" data-dismiss="alert" type="button">
										  <i class="icon-remove"></i>
										</button>
										<h4>提示:</h4>
										<i class="icon-hand-right green"></i>
										1.下载后如要刻盘，请勿修改下载后的文件名和文件内容，否则将可能无法进行后续的交换处理！
										<br/>
										<i class="icon-hand-right green"></i>
										2. 刻盘后需在外网进行光盘读取，并在外网数据交换平台（中央节点）上传文件，以便完成后续交换处理！
									</div>
								
									<form id="searchForm" class="form-search" action="${ctx}/monitor/carved_discs_manage_list.do" method="post"  onsubmit="return search(this)">
										<div class="row mg-top12">
											<div class="col-xs-4">
												<div class="input-group">
													<span class="input-group-addon">开始时间</span>
													<span class="input-icon input-icon-right width-100">
													<input type="text" class="input-cal"   id="startCreated" name="startCreated" value="${param.startCreated}" 
														onfocus="WdatePicker({onpicked:function(){endCreated.focus();},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true,maxDate:'#F{$dp.$D(\'endCreated\');}'})"
														style=""/>
													<i class="icon-calendar blue pointer" onclick="javascript:$('#startCreated').focus();"></i>
													</span>
												</div>
											</div>
											<div class="col-xs-4">
												<div class="input-group">
													<span class="input-group-addon">结束时间</span>
													<span class="input-icon input-icon-right width-100">
													<input type="text" class="input-cal" id="endCreated" name="endCreated" value="${param.endCreated}" 
														onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowWeek:true, minDate:'#F{$dp.$D(\'startCreated\');}'})"/>
													<i class="icon-calendar blue pointer" onclick="javascript:$('#endCreated').focus();"></i>
													</span>
												</div>
											</div>
											<div class="col-xs-4">
												<div class="input-group">
													<span class="input-group-btn">
														<button type="submit" class="btn btn-purple btn-sm">
															<i class="icon-search icon-on-right bigger-110"></i>
															搜索
														</button>&nbsp;&nbsp;
														<a href="${ctx}/monitor/carved_discs_manage_list.do" class="btn btn-purple btn-sm">
															<i class="icon-refresh icon-on-right bigger-110"></i>
															清空
														</a>
													</span>
												</div>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
						
						<div class="hr hr12 hr-dotted"></div>
						<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="carvedDiscs()"><i class="icon-download bigger-120"></i> 光盘文件上传&nbsp;</a>

						
						<div class="table-responsive">
							<table id="sample-table-1" class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th class="center">
											<label>
											<input type="checkbox" class="ace" id="checkedAll"/>
											<span class="lbl"></span>
											</label>
										</th>
										<th style="white-space: nowrap;">序号</th>
										<th style="white-space: nowrap;">文件名称</th>
										<th style="display: none;" >上传时间</th>
										<th style="white-space: nowrap;">处理状态</th>
										<th style="white-space: nowrap;">文件总大小（M）</th>
										<th style="white-space: nowrap;">操作</th>
									</tr>
								</thead>

								<tbody>
									<c:forEach var="vo" items="${_data}" varStatus="sta">
									<tr id="msg_${vo.id}"> 
										<td class="center">
											<label>
											<%-- <c:if test="${vo.sendStatus == '0' || vo.sendStatus == '1' || vo.sendStatus == '3'}"> --%>
											<input type="checkbox" class="ace" value="${vo.id}"/>
											<%-- </c:if> --%>
											<span class="lbl"></span>
											</label>
										</td>
										 <td class="center">
									       ${sta.count}
									    </td>
									    <td style="width: 10%;">
									      ${vo.batchId }  
									    </td>
									    <td style="display: none;">
									      ${vo.batchId }             
									    </td>
										<td><span title="${si:dataName(vo.sendBusicode) }">${si:dataName(vo.sendBusicode) }</span></td>
										<td><span title="${vo.auditPerson}">${vo.auditPerson}</span></td>
										<td class="left mytip" >
												 <%--   <span  title="发送适配器"  class="tipMe fa fa-puzzle-piece">&nbsp;${si:sysName(vo.sendSyscode)}</span>
												  <span class="icon-arrow-right"></span>
												  <span  class="tipMe icon-desktop" title="发送节点">&nbsp;${si:nodeName(vo.sendNodecode)}</span>
												  <span class="icon-arrow-right"></span>
												  <c:if test="${vo.crossNode=='0' && vo.crossNet=='0' }">
												  <span  class="tipMe fa fa-puzzle-piece" title="接收适配器">&nbsp;${si:sysName(vo.recvSyscode)}</span>
												  </c:if>
												  <c:if test="${vo.crossNode=='1' && vo.crossNet=='0' }">
												   <span  class="tipMe icon-desktop" title="接收节点">&nbsp;${si:nodeName(vo.recvNodecode)}</span>
												   <span class="icon-arrow-right"></span>
												   <span  class="tipMe fa fa-puzzle-piece" title="接收适配器">&nbsp;${si:sysName(vo.recvSyscode)}</span>
												  </c:if>
												  
												  <c:if test="${vo.crossNet=='1' }">
												   <span  class="tipMe fa fa-cloud-download" title="刻盘">&nbsp;刻盘</span>
												  </c:if> --%>
												
												  <c:if test="${fn:contains(vo.recvSyscode,',') }">
												            一点多发                          <a data-action="collapse" href="#" style="position: absolute;" 
												                     data="{sendSyscode:'${si:sysName(vo.sendSyscode) }',sendNodecode:'${si:nodeName(vo.sendNodecode)}',recvSyscode:'${vo.recvSyscode }',recvNodecode:'${vo.recvNodecode }'}">
																	   <i class="icon-chevron-up">
																	   </i>
																	   <span name="recvSyscode" style="display: none;">
																		<c:forEach var="code" items="${fn:split(vo.recvSyscode,',')}" varStatus="sta">
																		   ${si:sysName(code)},
																		</c:forEach>
																		</span>
																		<span name="recvNodecode" style="display: none;">
																			<c:forEach var="code" items="${fn:split(vo.recvNodecode,',')}" varStatus="sta">
																			   ${si:nodeName(code)},
																			</c:forEach>
																		</span>
																	</a>
												  </c:if>
												  <c:if test="${!fn:contains(vo.recvSyscode,',') }">
												     <span  title="发送适配器"  class="tipMe fa fa-puzzle-piece">&nbsp;${si:sysName(vo.sendSyscode)}</span>
												     <span class="icon-arrow-right"></span>
												     <span  class="tipMe icon-desktop" title="发送节点">&nbsp;${si:nodeName(vo.sendNodecode)}</span>
												     <span class="icon-arrow-right"></span>
												     <span  class="tipMe fa fa-cloud-download" title="刻盘">&nbsp;刻盘</span>
												     <span class="icon-arrow-right"></span>
												     <span  class="tipMe icon-desktop" title="接收节点">&nbsp;${si:nodeName(vo.recvNodecode)}</span>
												     <span class="icon-arrow-right"></span>
												     <span  title="接收适配器"  class="tipMe fa fa-puzzle-piece">&nbsp;${si:sysName(vo.recvSyscode)}</span>
												     
												  </c:if>
												  
										</td>
										<td>${si:fmtDate(vo.requestDate)}</td>
										<td name="fileSize"><fmt:formatNumber value="${vo.filesize/1000}" pattern="#,###"/></td>
										<td>${si:formatterFile(vo.filepaths)}</td>
										
									</tr>
									</c:forEach>
								</tbody>
							</table>
							<jsp:include page="/WEB-INF/view/common/pg.jsp">
								<jsp:param value="${ctx}/monitor/carved_discs_manage_list.do" name="url"/>
								<jsp:param value="${_total}" name="total"/>
								<jsp:param value="${_urlpara}" name="urlpara" />
							</jsp:include>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="popover fade bottom in" style="display: none;" id="roadInfo">
	<div class="arrow"></div>
	<h3 class="popover-title">一点多发路由</h3>
	<div class="popover-content"> Heads up! This alert needs your attention, but it's not super important.</div>
</div>

</body>
</html>
